<template>
	<button class="btn btn-sm btn-primary" @click="addCode()">批量添加兑换码</button>
	<vue-modal
    :title="title"
    ok-text="提交"
    cancel-text="取消"
    :show.sync="showMiniCodeImport"
    effect="fade"
    :small="true"
    :width="500"
    :callback="submit">
    <div slot="modal-body" class="modal-body">
      <form class="form-horizontal" role="form">
        <div class="form-group form-group-sm">
          <label class="col-sm-3 control-label">*兑换码</label>
          <div class="col-sm-9 text-left">
            <textarea v-model="update.codes" onkeyup="this.value=this.value.replace(/[^\r\n0-9\,\，]/g,'');" placeholder="请输入兑换码，以「 , 」分隔" class="form-control" rows="4"></textarea>
          </div>
        </div>
        <div class="form-group form-group-sm text-left">
          <label class="col-sm-3 control-label">*兑换码有效期</label>
          <div class="col-sm-9 control-label">
            <div class="text-left">
              <vue-date-picker
                :time.sync="update.expireTime"
                :option='datePickerOption'>
              </vue-date-picker>
            </div>
          </div>
        </div>
      </form>
    </div>
  </vue-modal>
</template>
<style src="./import-code.css" scoped></style>
<script src="./import-code.js"></script>
